<!DOCTYPE html>
<div style="writing-mode: vertical-rl; width: 400px; height: 400px; overflow-x: auto; backface-visibility: hidden">
  <div  style="position: relative" id="grandparent">
    Some text
    <div id="parent">
      <a id="child" style="position: relative">This text should not overlap the other text</a>

    </div>
  </div>
  <div style="width: 10000px; height:200px; background: yellow"></div>
</div>